Menu

Wiki usage

Creative Commons License
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.
Edit Sidebar
Main > MOHAAScriptLanguageAppendixB

Main.MOHAAScriptLanguageAppendixB History

Show minor edits - Show changes to output

January 31, 2005, at 04:03 PM by bjarne
Deleted lines 6-7:
* [[#hierarchy|The MOH class hierarchy]]
Changed lines 9-10 from:
To effectively use commands, it is vital to know that the commands are sent to objects. These objects are made from a class. Classes dictate what commands can be sent to objects that are made from that class. This document explains all you need to know about classes to perform advanced scripting. Many mappers will probably do just fine by copying others scripts and modifying them, but when you want to do some serious scripting from scratch: You need to know about the classes of MOH. For a complete ( but short ) definition of ALL classes, see the file [[../other_files/g_allclasses.html|g_allclasses.html]] ( for Allied Assault ) and [[../other_files/MOH_GameClasses.html|MOH_GameClasses.html]] ( for Spearhead ).
to:
To effectively use commands, it is vital to know that the commands are sent to objects. These objects are made from a class. Classes dictate what commands can be sent to objects that are made from that class. This document explains all you need to know about classes to perform advanced scripting. Many mappers will probably do just fine by copying others scripts and modifying them, but when you want to do some serious scripting from scratch: You need to know about the classes of MOH. For a complete ( but short ) definition of ALL classes, see the file Attach:g_allclasses.html ( for Allied Assault ) and Attach:MOH_GameClasses.html ( for Spearhead ).
Changed lines 13-14 from:
All commands are sent to an object that is of a specific class. As an example: all player objects are of the class '''Player''' and all script_object's are of the class '''ScriptSlave'''. All the classes are listed in the file [[../other_files/g_allclasses.html|g_allclasses.html]] ( for Allied Assault ) or [[../other_files/MOH_GameClasses.html|MOH_GameClasses.html]] ( for Spearhead ).
to:
All commands are sent to an object that is of a specific class. As an example: all player objects are of the class '''Player''' and all script_object's are of the class '''ScriptSlave'''. All the classes are listed in the file Attach:g_allclasses.html ( for Allied Assault ) or Attach:MOH_GameClasses.html ( for Spearhead ).
Changed lines 21-22 from:
This is the inheritance chain for the Player class. So? What about it? Well this means a lot of things, but the only thing you need to know is that the '->' arrow is interpreted as '''Player inherits from Sentient'''. So? Inherits what? Its commands! This means that all the commands from the classes it inherits from also work for the inheriting classes. This also means that via this inheritance chain, Player also inherits all commands from Class, Listener, SimpleEntity, Entity, Animate and Sentient. So remember when reading the [[http://www.planetmedalofhonor.com/rjukanproject/other_files/g_allclasses.html|g_allclasses.html]] or [[http://www.planetmedalofhonor.com/rjukanproject/other_files/MOH_GameClasses.html|MOH_GameClasses.html]] files: a class supports all the commands stated PLUS all the commands stated for the classes it inherits from ( this adds up to '''a lot''' of commands ).
to:
This is the inheritance chain for the Player class. So? What about it? Well this means a lot of things, but the only thing you need to know is that the '->' arrow is interpreted as '''Player inherits from Sentient'''. So? Inherits what? Its commands! This means that all the commands from the classes it inherits from also work for the inheriting classes. This also means that via this inheritance chain, Player also inherits all commands from Class, Listener, SimpleEntity, Entity, Animate and Sentient. So remember when reading the Attach:g_allclasses.html or Attach:MOH_GameClasses.html files: a class supports all the commands stated PLUS all the commands stated for the classes it inherits from ( this adds up to '''a lot''' of commands ).
January 31, 2005, at 03:00 AM by bjarne
Added lines 1-211:
!MOHAA script language, Appendix B ( Classes )

!!Table of contents

(:toc:)

* [[#hierarchy|The MOH class hierarchy]]

!!Classes, and how they are used

To effectively use commands, it is vital to know that the commands are sent to objects. These objects are made from a class. Classes dictate what commands can be sent to objects that are made from that class. This document explains all you need to know about classes to perform advanced scripting. Many mappers will probably do just fine by copying others scripts and modifying them, but when you want to do some serious scripting from scratch: You need to know about the classes of MOH. For a complete ( but short ) definition of ALL classes, see the file [[../other_files/g_allclasses.html|g_allclasses.html]] ( for Allied Assault ) and [[../other_files/MOH_GameClasses.html|MOH_GameClasses.html]] ( for Spearhead ).

!!Classes ( badly ) explained

All commands are sent to an object that is of a specific class. As an example: all player objects are of the class '''Player''' and all script_object's are of the class '''ScriptSlave'''. All the classes are listed in the file [[../other_files/g_allclasses.html|g_allclasses.html]] ( for Allied Assault ) or [[../other_files/MOH_GameClasses.html|MOH_GameClasses.html]] ( for Spearhead ).

Classes exist in an inheritance relationship. This works like this:

Lets use the '''Player''' class as an example:

'''Player''' -> Sentient -> Animate -> Entity -> SimpleEntity -> Listener -> Class

This is the inheritance chain for the Player class. So? What about it? Well this means a lot of things, but the only thing you need to know is that the '->' arrow is interpreted as '''Player inherits from Sentient'''. So? Inherits what? Its commands! This means that all the commands from the classes it inherits from also work for the inheriting classes. This also means that via this inheritance chain, Player also inherits all commands from Class, Listener, SimpleEntity, Entity, Animate and Sentient. So remember when reading the [[http://www.planetmedalofhonor.com/rjukanproject/other_files/g_allclasses.html|g_allclasses.html]] or [[http://www.planetmedalofhonor.com/rjukanproject/other_files/MOH_GameClasses.html|MOH_GameClasses.html]] files: a class supports all the commands stated PLUS all the commands stated for the classes it inherits from ( this adds up to '''a lot''' of commands ).

!!The MOH class hierarchy

Here is the complete class inheritance chain for Medal of Honor:
* Class
** Ammo
** Archiver
** Event
*** AnimationEvent
*** ConsoleEvent
** FileRead
** LightStyleClass
** PathSearch
** Script
** ScriptVariableList
** SpawnArgs
** StateScript
** TargetList
** VoteOptions
** Listener
*** CameraManager
*** DM_Manager
*** DM_Team
*** Game
*** InfoNull *
*** Level
*** LODMaster
*** Parm
*** ViewMaster
*** ScriptClass
*** ScriptMaster
*** ScriptThread
*** SoundManager
*** SimpleEntity
**** GrenadeHint
**** PathNode
**** SimpleArchivedEntity
***** TempWaypoint
***** Waypoint
****** VehiclePoint
***** PlayerStart
****** PlayerDeathmatchStart
******* PlayerAlliedDeathmatchStart
******* PlayerAxisDeathmatchStart
****** TestPlayerStart
**** Entity
***** BarrelObject
***** Camera
****** PlayerIntermission
***** CrateObject
***** Decal
***** Emitter
***** FallingRock
***** FencePost *
***** FuncLadder
***** FuncRemove
***** HelmetObject
***** HorizontalPipe
***** InfoNotNull
***** Light
***** MonkeyBars
***** Objective *
****** TOWObjective *
***** RunThrough
***** PortalCamera
***** PortalSurface
***** ProjectileTarget *
***** PushObject
***** Rain
***** SplinePath
***** TeleporterDestination
***** UseAnim
****** TouchAnim
***** UseAnimDestination
***** VehicleCollisionEntity
***** VehicleSoundEntity
***** World
***** WindowObject
***** Animate
****** Body
****** EffectEntity
******* SmokeGrenade *
****** DamageModel *
****** InteractObject
****** LODSlave
****** Object
******* ThrowObject
****** Projectile
******* Explosion
****** ProjectileGenerator *
******* ProjectileGenerator_Gun *
******* ProjectileGenerator_Heavy *
******* ProjectileGenerator_Projectile *
****** PuffDaddy
****** Sentient
******* Player
******* SimpleActor
******** Actor
****** ThrobbingBox_Explosive *
******* ThrobbingBox_ExplodeFlak88 *
******* ThrobbingBox_ExplodeNebelwerfer *
******* ThrobbingBox_ExplodePlayerFlak88 *
******* ThrobbingBox_ExplodePlayerNebelwerfer *
******* ThrobbingBox_Stickybomb *
****** ThrowObject
****** TossObject
****** TreeModel
****** UseObject
****** VehicleBase
******* Vehicle
******** DrivableVehicle
********* VehicleHalfTrack
********* VehicleTank
********** FixedTurret *
********** VehicleTankTandem *
********* VehicleWheelsX2
********* VehicleWheelsX4
****** Viewthing
****** Trigger
******* Exploder
******* ExplodingWall
******* Item
******** Health
******** DynItem
******** AmmoEntity
******** Armor
******** Weapon
********* TurretGun
********** PortableTurret
********** VehicleTurretGun
*********** VehicleTurretGunTandem*
********* InventoryItem
********** CarryableTurret *
********* Flamethrower
******* Mover
******** Gib
******** ScriptSlave
********* SinkObject
********* ScriptSkyOrigin
********* ScriptOrigin
********* ScriptModel
********** ScriptModelRealDamage *
********* ScriptSimpleStrafingGunfire *
********** ScriptAimedStrafingGunfire *
********* Spawn
********** SpawnOutOfSight
********** SpawnChain
********** ReSpawn
********** RandomSpawn
********* Door
********** ScriptDoor
********** RotatingDoor
********** SlidingDoor
********* Fulcrum
********* FuncBeam
******* MultiExploder
******** ExplodeObject
******* TriggerAll
******* TriggerBox
******* TriggerChangeLevel
******* TriggerClickItem
******* TriggerDamageTargets
******* TriggerExit
******* TriggerGivePowerup
******* TriggerHurt
******* TriggerMusic
******* TriggerOnce
******** TriggerSecret
******** TriggerSave
******** TriggerByPushObject
******* TriggerPlaySound
******** TriggerSpeaker
********* RandomSpeaker
******* TriggerPush
******* TriggerPushAny
******* TriggerRelay
******* TriggerReverb
******* TriggerUse
******** TriggerCameraUse
******** TriggerNoDamage *
******* TriggerVehicle
******* Teleporter
******* TouchField
******* ViewJitter

Classes with a '*' after them, are only found in Medal of Honor : Spearhead

It is read like this: A VehicleTurretGun is a TurretGun ( inherits all commands from TurretGun ), a TurretGun is a Weapon, a Weapon is an Item, an Item is a Trigger, a Trigger is an Animate, an Animate is an Entity, an Entity is a SimpleEntity, a SimpleEntity is a Listener, a Listener is a Class... and here's the cool thing: a VehicleTurretGun is ( because of inheritance ) a Class ( and all things between VehicleTurretGun and Class as well ).

Recent Changes Printable View Page History Edit Page [Attributes] [Printable View] [WikiHelp]
Page last modified on January 31, 2005, at 04:03 PM